package cn.js.ccit.flowersmall.order.service.impl;

import cn.js.ccit.flowersmall.order.entity.GiftOrderEntity;
import cn.js.ccit.flowersmall.order.entity.OrderEntity;
import cn.js.ccit.flowersmall.order.mapper.OrderMapper;
import cn.js.ccit.flowersmall.order.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Resource
    OrderMapper orderMapper;
    @Override
    public List<OrderEntity> findOrders(String userName) {
        return orderMapper.findOrders(userName);
    }

    @Override
    public int addOrder(OrderEntity order) {
        return orderMapper.addOrder(order);
    }

    @Override
    public List<GiftOrderEntity> findGiftOrders(String userName) {
        return orderMapper.findGiftOrders(userName);
    }

    @Override
    public int addGiftOrder(GiftOrderEntity order) {
        return orderMapper.addGiftOrder(order);
    }
}
